<?php

namespace App\Models;

use Dcat\Admin\Traits\HasDateTimeFormatter;

use Illuminate\Database\Eloquent\Model;

class MiniProgramMainTab extends Model
{
    use HasDateTimeFormatter;

    protected $table = 'mini_program_main_tab';

    const TYPE_BY_TOP = 'top';
    const TYPE_BY_CENTRAL = 'central';

    public static function typeMaps()
    {
        return [
            self::TYPE_BY_TOP     => '顶部',
            self::TYPE_BY_CENTRAL => '中部',
        ];
    }

    public function jump()
    {
        return $this->hasOne(JumpTag::class, 'id', 'jump_tag_id');
    }


}
